<template>
  <div>
    <keep-alive>
      <component :is="comName"></component>
    </keep-alive>
    <!-- <ShouYe></ShouYe> -->
    <FenYe></FenYe>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item class="asd" v-for="(item, index) in list" :key="index">
        <img :src="item.pic" alt="" />
      </van-swipe-item>
    </van-swipe>
    <Liebiao></Liebiao>
  </div>
</template>

<script>
import ShouYe from "../../components/ShouYe/ShouYe.vue";
import FenYe from "../../components/FenYe/FenYe.vue";
import Liebiao from "./Liebiao/Liebiao.vue";
import service from "./service";
export default {
  data() {
    return {
      list: [],
      comName: "ShouYe",
      // components: [ShouYe, FenYe],
    };
  },
  components: { ShouYe, FenYe, Liebiao },
  async created() {
    const result = await service.getBanner();
    this.list = result.result.sliders;
    // console.log(this.lin);
  },
};
</script>
<style lang="less">
@import "../../style/index.less";
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
}
.asd img {
  .w(375);
  .h(150);
}
</style>
